home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Toolbox
/
Visual Basic Toolbox (P.I.E.)(1996).ISO
/
toolbar
/
spltrcls
/
vsplittr.frm
< prev
next >
Wrap
Text File
|
1995-11-14
|
5KB
|
172 lines
VERSION 4.00
Begin VB.Form frmVSplitter
Appearance = 0 'Flat
BackColor = &H00C0C0C0&
Caption = "Vertical Splitter Test"
ClientHeight = 2865
ClientLeft = 1380
ClientTop = 1710
ClientWidth = 5595
ClipControls = 0 'False
DrawMode = 10 'Mask Pen
DrawStyle = 6 'Inside Solid
DrawWidth = 4
FillStyle = 0 'Solid
BeginProperty Font
name = "MS Sans Serif"
charset = 0
weight = 700
size = 8.25
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
ForeColor = &H00808080&
Height = 3270
Left = 1320
LinkMode = 1 'Source
LinkTopic = "NoteMain"
LockControls = -1 'True
ScaleHeight = 2865
ScaleWidth = 5595
Top = 1365
Width = 5715
Begin VB.PictureBox picVContainer
Appearance = 0 'Flat
BackColor = &H00C0C0C0&
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 2640
Left = 105
ScaleHeight = 2640
ScaleWidth = 5370
TabIndex = 0
Top = 105
Width = 5370
Begin VB.PictureBox picVSplitter
BackColor = &H00C0C0C0&
BorderStyle = 0 'None
DrawMode = 1 'Blackness
DrawStyle = 5 'Transparent
Height = 2430
Left = 2625
MouseIcon = "VSplittr.frx":0000
MousePointer = 99 'Custom
ScaleHeight = 2430
ScaleWidth = 45
TabIndex = 1
Top = 105
Width = 45
End
Begin VB.TextBox txtLeft
BeginProperty Font
name = "MS Sans Serif"
charset = 0
weight = 400
size = 8.25
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 2430
Left = 105
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 3
Text = "VSplittr.frx":0152
Top = 105
Width = 2535
End
Begin VB.TextBox txtRight
BeginProperty Font
name = "MS Sans Serif"
charset = 0
weight = 400
size = 8.25
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 2430
Left = 2730
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 2
Text = "VSplittr.frx":0212
Top = 105
Width = 2535
End
End
End
Attribute VB_Name = "frmVSplitter"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Option Explicit
' form position constants
Const FORM_LEFT = 0
Const FORM_TOP = 0
' splitter position and offsets
Const SPLITTER_LEFT = 105
Const SPLITTER_TOP = 105
Const SPLITTER_WIDTH_OFFSET = 315
Const SPLITTER_HEIGHT_OFFSET = 600
' splitter object
Dim moVSplitter As CVerticalSplitter
Private Sub Form_Load()
' position
Me.Move FORM_LEFT, FORM_TOP
' instantiate the splitter object
Set moVSplitter = New CVerticalSplitter
moVSplitter.Init picVContainer, picVSplitter, _
txtLeft, txtRight
End Sub
Private Sub Form_Resize()
' resize the container
If Me.WindowState <> vbMinimized Then
moVSplitter.Move SPLITTER_LEFT, _
SPLITTER_TOP, _
Me.Width - SPLITTER_WIDTH_OFFSET, _
Me.Height - SPLITTER_HEIGHT_OFFSET
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
' release the splitter object
Set moVSplitter = Nothing
End Sub
Private Sub picVSplitter_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
' record event
moVSplitter.MouseDown
End Sub
Private Sub picVSplitter_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
' record event
moVSplitter.MouseMove X
End Sub
Private Sub picVSplitter_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
' record event
moVSplitter.MouseUp
End Sub